package com.pan.entity;


import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 订单主体的实体类
 *
 * @author gaopengf
 * @date 2018-04-18 15:02:26
 */
@Setter
@Getter
@ToString
public class Order implements Cloneable, Serializable {


    private String orderId;


    private String goodsId;

    private BigDecimal goodsNum;

    /**
     * 发票信息
     */
    private OrderInvoice orderInvoice;


    @Override
    public Order clone() throws CloneNotSupportedException {
        Order order= (Order)super.clone();
        OrderInvoice orderInvoiceClone = orderInvoice.clone();
        orderInvoiceClone.setOrder(order);
        order.setOrderInvoice(orderInvoiceClone);
        return order;
    }

}
